package com.example.communist_app_api.db.dao;

import com.example.communist_app_api.db.dto.UserOrganizationDTO;
import com.example.communist_app_api.db.pojoDto.Organization;
import com.example.communist_app_api.db.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserOrganizationDao {

    Integer joinCommunistByOrganizationIdAndUserId(@Param("organizationId") Integer organizationId,
                                               @Param("userId") Integer userId);

    String selectOrganizationNameByUserId(Integer userId);

    Organization getOrganizationByUserId(Integer userId);

<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 党建uniapp/dev
    List<User> getAllUserByOrganizationIdBySelect(Integer organizationIdBySelect);

    Boolean updateUserOrganization(@Param("userIdBySelect") Integer userIdBySelect, @Param("organizationId") Integer organizationId);

    void deletedAllUserByOrganizationId(Integer organizationId);

    Integer getUserNumInOrganizationByOrganizationId(Integer organizationId);

    void transformRelationshipByUserIdAndOrganizationId(@Param("userId") Integer userId, @Param("organizationId") Integer organizationId);

    List<UserOrganizationDTO> getUserOrganizationListByUserIdList(@Param("userIdList") List<Integer> userIdList);

<<<<<<< HEAD
    //通过用户Id查询本组织的所有用户
    List<Integer> getAllUserIdByUserId(Integer userId);

    String getOrganizationLevelByUserId(Integer userId);

    List<Integer> getAllGeneralPartyBranchUserIdByorganizationIdList(@Param("organizationIdList") List<Integer> organizationIdList);
=======
    int getOrganizationIdByUserId(Integer userId);
>>>>>>> ead867a76a2d61b0673929f4330d549b1f515bf4
}
=======
    int getOrganizationIdByUserId(Integer userId);
}
>>>>>>> 党建uniapp/dev
